EAPI="5"

inherit git-2 eutils qmake-utils

DESCRIPTION="Audio server to receive audio/pcm stream over LAN"
HOMEPAGE="https://code.google.com/p/audio-transfer-server"

EGIT_REPO_URI="https://code.google.com/p/audio-transfer-server/"

LICENSE="LGPL-3"
SLOT="0"
KEYWORDS=""
IUSE="+qt4 qt5 pulseaudio alsa multimedia"
REQUIRED_USE="^^ ( qt4 qt5 )"

RDEPEND="qt5? ( dev-qt/qtgui:5
                dev-qt/qtcore:5
                dev-qt/qtnetwork:5
                multimedia? ( dev-qt/qtmultimedia:5 )
              )
        qt4? ( dev-qt/qtgui:4
                dev-qt/qtcore:4
                multimedia? ( dev-qt/qtmultimedia:4 ) 
             )
        pulseaudio? ( media-sound/pulseaudio )
        alsa? ( media-libs/alsa-lib )"

DEPEND="${RDEPEND}"

src_configure() {
        use qt5 && eqmake5
        use qt4 && eqmake4
}

src_install() {
        dobin audio-transfer-server
        insinto /etc/
        doins audio-transfer-server.ini
}

